package com.ruoyi.community.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.community.mapper.CommunityCommentsMapper;
import com.ruoyi.community.domain.CommunityComments;
import com.ruoyi.community.service.ICommunityCommentsService;

/**
 * 社区评论Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-07-21
 */
@Service
public class CommunityCommentsServiceImpl implements ICommunityCommentsService 
{
    @Autowired
    private CommunityCommentsMapper communityCommentsMapper;

    /**
     * 查询社区评论
     * 
     * @param commentsId 社区评论主键
     * @return 社区评论
     */
    @Override
    public CommunityComments selectCommunityCommentsByCommentsId(Long commentsId)
    {
        return communityCommentsMapper.selectCommunityCommentsByCommentsId(commentsId);
    }

    /**
     * 查询社区评论列表
     * 
     * @param communityComments 社区评论
     * @return 社区评论
     */
    @Override
    public List<CommunityComments> selectCommunityCommentsList(CommunityComments communityComments)
    {
        return communityCommentsMapper.selectCommunityCommentsList(communityComments);
    }

    /**
     * 新增社区评论
     * 
     * @param communityComments 社区评论
     * @return 结果
     */
    @Override
    public int insertCommunityComments(CommunityComments communityComments)
    {
        return communityCommentsMapper.insertCommunityComments(communityComments);
    }

    /**
     * 修改社区评论
     * 
     * @param communityComments 社区评论
     * @return 结果
     */
    @Override
    public int updateCommunityComments(CommunityComments communityComments)
    {
        return communityCommentsMapper.updateCommunityComments(communityComments);
    }

    /**
     * 批量删除社区评论
     * 
     * @param commentsIds 需要删除的社区评论主键
     * @return 结果
     */
    @Override
    public int deleteCommunityCommentsByCommentsIds(Long[] commentsIds)
    {
        return communityCommentsMapper.deleteCommunityCommentsByCommentsIds(commentsIds);
    }

    /**
     * 删除社区评论信息
     * 
     * @param commentsId 社区评论主键
     * @return 结果
     */
    @Override
    public int deleteCommunityCommentsByCommentsId(Long commentsId)
    {
        return communityCommentsMapper.deleteCommunityCommentsByCommentsId(commentsId);
    }
}
